Key words: CRC algorithm principle; CRC verification; modulo 2 (mod 2); mod 2The CRC verification algorithm adopts a binary algorithm called "modulo 2 operation. The modulo 2 operation is the core part of the CRC operation. Therefore, before
Complement and modulo, complementI. Reasons for this article
I did some research on reverse code, complement code, and floating point number yesterday, but there are still some omissions. I discussed it with the fans in the dormitory at night.
In many cases, modulo operations are used. Here we describe some pattern operations and prove them. The practical application of these theories will be recorded and explained in the future.
1. The modulo operation is a remainder operation (recorded
Note: This is just my personal understanding. It may be incorrect.
For integers A and N, the modulo n operation is to calculate the remainder of a divided by N.
If a = 10, n = 3, the quotient of a divided by N is 3, and the remainder is 1.
C
This article is reproduced in: http://blog.sina.com.cn/s/blog_6f5c63ff0100tucb.html
We know that in different languages, the results of negative number modulo operations may be different. For example, (-11) % 5 calculates 4 in Python, whileThe
Fast idempotent modulo _ C ++ and idempotent modulo _ C
I. Question Background
Base Number a, exponent B, modulo value mo
Ask ans = AB % mo
Ii. Simple Algorithm (skip if known)
Ans = 1, cyclically from I to B, and each time the ans = ans * a % mo
[Java Basics] 14. bitwise operations-bitwise AND (&) operations-(fast modulo algorithm) and java Basics 14 Operations
The redis dictionary structure is learned. The hash Value & sizemask operation is used when the hash is used to find the index
Test Data
1515151 1213.... 0836060000151144 2002.... 355873344010000000000 11411.... 0000000000115123131 1210.... 212639300054546161515130 121231321.... 6496000000
Because I am too watery in number theory, I spent more than a day on this topic, and
The following excerpt from the Wikipedia "http://zh.wikipedia.org/wiki/Luhn%E7%AE%97%E6%B3%95" Luhn algorithm (Luhn algorithm), also known as the "modulo" (Mod 10) algorithm, is a simple checksum algorithm, generally used to verify the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.